﻿using App.Common;
using QxFramework.Core;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class DebugCommandUI : UIBase
{

    public override void OnDisplay(object args)
    {
        base.OnDisplay(args);
        transform.Find("DebugBtn").GetComponent<Button>().onClick.AddListener(QuestionBtn);
    }

    public void QuestionBtn()
    {
        List<string> list = new List<string>();
        List<Action> action = new List<Action>();
        list.Add("门打不开");
        action.Add(OpenDoor);
        list.Add("我穿墙了");
        action.Add(SetPlayerPos);
        UIManager.Instance.Open("DialogWindowUI", 2, args: new DialogWindowUI.DialogWindowUIArg("提示", "遇到了什么问题呢?", null, list, action));
    }
  
    private void OpenDoor()
    {
        GameMgr.Get<IMissionManager>().RemoveDoors();
    }
    private void SetPlayerPos()
    {
        GameMgr.Get<IMissionManager>().ResetPlayerPos();
    }
}
